from app.extensions import db
from app.models.task import Task
#
def addTask(task):
    db.session.add(task)
    db.session.commit()


def getTask(id):
    task = Task.query.filter_by(id=id).first()
    return task


def getTasks():
    tasks = Task.query.all()
    return tasks
